package com.example.wishstar.model;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity(tableName = "oldhabit")
public class OldHabit {
    @PrimaryKey()
    @ColumnInfo(name = "habitId", typeAffinity = ColumnInfo.INTEGER)
    public int habitId;

    @ColumnInfo(name = "userId", typeAffinity = ColumnInfo.INTEGER)
    public int userId;

    @ColumnInfo(name = "habitTitle", typeAffinity = ColumnInfo.TEXT)
    public String habitTitle;

    @ColumnInfo(name = "frequency", typeAffinity = ColumnInfo.TEXT)
    public String frequency;

    @ColumnInfo(name = "habitIcon", typeAffinity = ColumnInfo.INTEGER)
    public int habitIcon;

    @ColumnInfo(name = "dayNum", typeAffinity = ColumnInfo.INTEGER)
    public int dayNum;

    @ColumnInfo(name = "dayNumString", typeAffinity = ColumnInfo.TEXT)
    public String dayNumString;

    @ColumnInfo(name = "state", typeAffinity = ColumnInfo.INTEGER)
    public int state;

    @ColumnInfo(name = "habitDetails", typeAffinity = ColumnInfo.TEXT)
    public String habitDetails;

    @ColumnInfo(name = "gmtCreate", typeAffinity = ColumnInfo.TEXT)
    public String gmtCreate;

    @ColumnInfo(name = "gmtModified", typeAffinity = ColumnInfo.TEXT)
    public String gmtModified;

    public OldHabit(int habitId, int userId, String habitTitle, String frequency, int habitIcon, int dayNum, String dayNumString, int state, String habitDetails, String gmtCreate, String gmtModified) {
        this.habitId = habitId;
        this.userId = userId;
        this.habitTitle = habitTitle;
        this.frequency = frequency;
        this.habitIcon = habitIcon;
        this.dayNum = dayNum;
        this.dayNumString = dayNumString;
        this.state = state;
        this.habitDetails = habitDetails;
        this.gmtCreate = gmtCreate;
        this.gmtModified = gmtModified;
    }

    @Override
    public String toString() {
        return "OldHabit{" +
                "habitId=" + habitId +
                ", userId=" + userId +
                ", habitTitle='" + habitTitle + '\'' +
                ", frequency='" + frequency + '\'' +
                ", habitIcon=" + habitIcon +
                ", dayNum=" + dayNum +
                ", dayNumString='" + dayNumString + '\'' +
                ", state=" + state +
                ", habitDetails='" + habitDetails + '\'' +
                ", gmtCreate='" + gmtCreate + '\'' +
                ", gmtModified='" + gmtModified + '\'' +
                '}';
    }
}
